home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Trading on the Edge
/
Trading On The Edge - CD-ROM Toolkit (Wayzata Technology)(2031)(1994).bin
/
pc
/
mac_file
/
vendor_d
/
neuralwa
/
nw2v50
/
fzartmap.nnc
< prev
next >
Wrap
Text File
|
1993-08-23
|
3KB
|
86 lines
csv3.8 !file format is Control Strategy Version 3.8
! Jun 1992 (fzartmap.nnc) Fuzzy ARTMAP Network control strategy
!************************************************************************
!* *
!* Fuzzy ARTMAP Control Strategy *
!* *
!************************************************************************
! Note: This implementation has been written with performance
! rather than neuralogical plausability in mind. The algorithmic
! form of Fuzzy ARTMAP has been mapped to the NeuralWorks model
! in as efficient a way as possible. Therefore, there is no
! explicit representation of the two layer resonance, gain control
! sub-system and orienting sub-system which can be seen in the
! NeuralWorks implementation of ART1.
!
!MASK label op-code operands comment
L_saR_sa trace aux3 ! 0 set trace option to aux3
L_saRi_a cset recall,0 ! 1 recall count
!
! Get input (learn/test/recall) and desired output (learn/test)
!
L_saRi_a lset in ! 2 input layer
L___Ri_a io read ! 3 get input data (recall)
L_saR___ io lrnin ! 4 get input data (learn)
L_saRi_a lset out ! 5 output layer
L_saR___ io lrnout ! 6 get desired output (learn)
L___Ri_a io rcltst ! 7 get desired output (test)
L_saRi_a math ce=e|fire ! 8 Save desired output
!
! Process Input Layer
!
L_saRi_a lset in ! 9 input layer
L___Ri_a math sum|rnoise|tran|output ! 10
L_saR___ math sum|lnoise|tran|output|fire ! 11
!
! Complement Coding (Pre-processing)
!
L_saRi_a lset in,1 ! 12 Complement layer
L_saRi_a math sum|tran|output|fire ! 13 Obtain complements
!
! Category Layer
!
L_saRisa lset out,-1 ! 14 Category layer
L_saRi_a math sum|tran|fire ! 15 Initialize outputs
L_saR_sa @ctout math o=0|output|fire ! 16 Current output
!
! Output Layer
!
L_saR_sa lset out ! 17 Output layer
L_saR_sa math sum|e=ce|tran|e-=w|fire ! 18 Error before output
L_saR_sa math output|fire ! 19 Generate output
!
! Check if it was an uncommitted node that won or if there are no
! nodes left
!
L_saR___ ccmp wrk2,0 ! 20 node already committed?
L_saR___ beq @nolrn ! 21 yes
L_saR___ ccmp wrk2,2 ! 22 out of nodes?
L_saR___ beq @doout ! 23 yes
L_saR___ math learn|fire ! 24 Learn output map
L_saR___ math output|fire ! 25 Regenerate output value
L_saR___ br @lncat ! 26
!
! Test out results of match
L_saR___ @nolrn ccmp wrk1,0 ! 27 wrk1=1 if error no good
L_saR___ beq @lncat ! 28
!
! Go back to category layer and get another winner
!
L_saR___ cadd recall,1 ! 29 increment recall counter
L_saR___ lset out ! 30 output layer
L_saR___ io wrstep ! 31 learn step
L_saR___ lset out,-1 ! 32 category layer
L_saR___ brct @ctout ! 33 try again
!
! Update category weights
!
L_saR___ @lncat lset out,-1 ! 34 category layer
L_saR___ math learn|fire ! 35
L_saR_sa @doout lset out ! 36 output layer
L_saR_sa math ce=e|fire ! 37 final error
L_saR___ io lrnrslt ! 38 learn result
L___R_sa io write ! 39 recall result
!
LisaRisa trace 0 ! 40 turn off any trace function